package com.example.zbh.dsliao.model.entity;

import com.example.zbh.dsliao.utils.DliaoUtils;

/**
 * Created by zbh on 15/11/20.
 */
public class ContactPeople implements Comparable<ContactPeople>{
    private String name;
    private String pinyin;
    private int isChange = 0;

    public int getIsChange() {
        return isChange;
    }

    public void setIsChange(int isChange) {
        this.isChange = isChange;
    }

    public ContactPeople(String name) {
        this.name = name;
        this.pinyin = DliaoUtils.getPinyin(name);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPinyin() {
        return pinyin;
    }

    public void setPinyin(String pinyin) {
        this.pinyin = pinyin;
    }

    @Override
    public int compareTo(ContactPeople another) {
        return pinyin.compareTo(another.pinyin);
    }
}
